package com.social.service;

import java.util.List;

import com.social.daoEx.UserContactMapperEx;
import com.social.daoEx.model.UserContactEx;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.social.dao.UserContactMapper;
import com.social.dao.model.UserContact;
import com.social.dao.model.UserContactExample;
import com.social.dao.model.UserContactKey;

@Service
public class UserContactService {
	@Autowired
	private UserContactMapper userContactMapper;
	@Autowired
	private UserContactMapperEx userContactMapperEx;

	public int countByExample(UserContactExample example) {
		return this.userContactMapper.countByExample(example);
	}

	public UserContact selectByPrimaryKey(UserContactKey key) {
		return this.userContactMapper.selectByPrimaryKey(key);
	}

	public List<UserContact> selectByExample(UserContactExample example) {
		return this.userContactMapper.selectByExample(example);
	}

	public int deleteByPrimaryKey(UserContactKey key) {
		return this.userContactMapper.deleteByPrimaryKey(key);
	}

	public int updateByPrimaryKeySelective(UserContact record) {
		return this.userContactMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(UserContact record) {
		return this.userContactMapper.updateByPrimaryKey(record);
	}

	public int deleteByExample(UserContactExample example) {
		return this.userContactMapper.deleteByExample(example);
	}

	public int updateByExampleSelective(UserContact record, UserContactExample example) {
		return this.userContactMapper.updateByExampleSelective(record, example);
	}

	public int updateByExample(UserContact record, UserContactExample example) {
		return this.userContactMapper.updateByExample(record, example);
	}

	public int insert(UserContact record) {
		return this.userContactMapper.insert(record);
	}

	public int insertSelective(UserContact record) {
		return this.userContactMapper.insertSelective(record);
	}

	public int insertBatch(List<UserContact> list){
		//每次500条
		int r = this.userContactMapperEx.insertBatch(list);
		return r;
	}

	public List<UserContactEx> selectAppList(Integer userId){
		return this.userContactMapperEx.selectAppList(userId);
	}
}
